#include "MyTask.h"
#include <thread>
 MyTask::MyTask(TcpConnectionPtr conn, const std::string & msg)
:_conn(conn),_msg(msg)
{

}

void MyTask::process()
{
    //解码业务数据
    
    // do something
    std::thread::id tid = std::this_thread::get_id();
    std::string result =" processed = "+ _msg  ;
    std::cout<<"MyTask::process msg = "<<result<<" tid = "<<tid<<std::endl;

    //编码业务数据
    _conn->sendInLoop(result);
}